package course;

import java.io.Serializable;

public class Course implements Serializable {
    private int courseId;

    private String courseName;

    private String classroom;

    private String time;

    private String teacher;

    private int grade;

    public  Course(){}

    public Course(int id, String courseName, String classroom, String time, String teacher, int grade) {
        this.courseId = id;
        this.courseName = courseName;
        this.classroom = classroom;
        this.time = time;
        this.grade = grade;
        this.teacher = teacher;
    }

    public int getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getClassroom() {
        return classroom;
    }

    public String getTime() {
        return time;
    }

    public void getPoint(int point) {
        this.grade = point;
    }

    public void getTeacher(String Teacher) {
        this.teacher = Teacher;
    }

    @Override
    public String toString() {
        return "id: " + this.courseId + " name: " + this.courseName + " classroom: " + this.classroom;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Course)) {
            return false;
        }
        return this.courseId == ((Course) object).courseId;
    }
}
